package com.zxyankh.lijun.controller;

import com.zxyankh.lijun.dto.DisplayDto;
import com.zxyankh.lijun.dto.TimeDto;
import com.zxyankh.lijun.service.DisplayService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ankh
 * @since 14.11.2018
 */
@RestController
@RequestMapping("/")
public class DisplayController {

    @Resource
    private DisplayService displayService;

    @GetMapping("/display")
    public DisplayDto display() {
        return displayService.getDisplayInfo();
    }

    @GetMapping("/time")
    public TimeDto time() {
        return displayService.getTime();
    }

}
